package com.itheima.zuoye2.zy4;

import java.util.Random;
import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        TreeSet set = new TreeSet();
        Random r = new Random();
        for (int i = 0; i < 8; i++) {
            int a = r.nextInt(10, 20);
            System.out.println("第"+i+"个随机数是："+a);
            set.add(a);
        }
        System.out.println("集合中所有"+set);

    }
}
